/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartSwitch {
    static categoryCode = '010010023';

    static categoryName = '智能开关';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return SmartSwitch.categoryCode;
    }

    get categoryName() {
        return SmartSwitch.categoryName;
    }

    getSwitchStatus(params) {
        return command({
            method: 'getSwitchStatus',
            methodId: 'pZgRgx6A',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTriggerMethod(params) {
        return command({
            method: 'getTriggerMethod',
            methodId: 'pGoxubor',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWirelessStatus(params) {
        return command({
            method: 'getWirelessStatus',
            methodId: 'p1vFkqGd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setStatus(params) {
        return command({
            method: 'setStatus',
            methodId: 'peHyXjTw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTriggerMethod(params) {
        return command({
            method: 'setTriggerMethod',
            methodId: 'ppAXpyjU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWirelessStatus(params) {
        return command({
            method: 'setWirelessStatus',
            methodId: 'pUPQQGaC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartSwitch;
